<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/webpage/common/taglibs.jspf"%>
<!DOCTYPE html>
<html>
<head>
  <title><spring:message code="sys.product.title" /></title>
  <meta name="decorator" content="list"/>
</head>
<body title="<spring:message code="sys.product.title" />">
<grid:grid id="productId" url="${adminPath}/sys/product/ajaxList" shrinkToFit="true" width="100">
	<grid:column label="sys.common.key" hidden="true"   name="id" />
    <grid:column label="商品名称"  name="title"  query="true"  queryModel="input"  width="800"  condition="like" />
    <grid:column label="店铺名称"  name="shopTitle"  width="500" />
    <grid:column label="店铺"  name="userType" width="150"/>
    <grid:column label="折扣价"  name="zkFinalPrice" width="200" />
    <grid:column label="卖家昵称"  name="nick"  width="400" />
    <grid:column label="30天销量"  name="volume"  width="250" />
    <grid:column label="商品详情页链接地址"  name="itemUrl" width="300"  />
    <grid:column label="优惠券总量"  name="couponTotalCount" width="300"  />
    <grid:column label="佣金比率(%)"  name="commissionRate" width="200" />
    <grid:column label="优惠券面额"  name="couponInfo" width="400"  />
    <grid:column label="后台一级类目"  name="category"  width="300" />
    <grid:column label="itemId"  name="numId"  width="500" />
    <grid:column label="优惠券剩余量"  name="couponRemainCount" width="300" />
    <grid:column label="优惠券开始时间"  name="couponStartTime"  dateformat='yyyy/MM/dd hh:mm:ss' width="300" />
    <grid:column label="优惠券结束时间"  name="couponEndTime"  width="300" />
    <grid:column label="商品优惠券推广链接"  name="couponClickUrl" width="300" />
    <grid:column label="宝贝描述（推荐理由）"  name="itemDescription" width="300" />

    <grid:toolbar function="create"/>
	<grid:toolbar   function="update" />
	<grid:toolbar   function="delete" />
	<grid:toolbar   title="sys.product.get"  onclick="getProducts()" icon="fa-hand-grab-o"/>

	<grid:toolbar  function="search"  />
	<grid:toolbar  function="reset" />
</grid:grid>

<script>
    function getProducts() {

        swal({
                title: "淘宝数据抓取",
                text: "由于数据较多，所以抓取时间较长，请耐心等待！",
                type: "info",
                showCancelButton: true,
                closeOnConfirm: false,
                showLoaderOnConfirm: false,
                timer: 2000
            },
            function(){
                $.get("/admin/sys/product/get", function () {
                    swal("数据抓取完成！");
                })

            });

    }
</script>
</body>
</html>